package com.tuo51.core.domain.staffs;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tuo51.foudation.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.*;
import java.util.Date;

/**
 * *******************************
 * Created by Ron.
 * form com.tuo51
 * on 2017/7/10
 * *******************************
 */
@Data
@Entity
@Table(name = "staff_ext_info")
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class StaffExtInfo extends Domain {

    @JsonIgnore
    @Column(name = "staff_id", unique = true)
    private String staffId;

    @JsonIgnore
    @OneToOne
    @JoinColumn(name = "staff_id", insertable = false, updatable = false, unique = true)
    Staff staff;

    /////  用户基础信息

    @Column(columnDefinition = "datetime COMMENT '生日'")
    private Date birthday = new Date();

    @Column(columnDefinition = "varchar(50) COMMENT '部门'")
    private String department;

    @Column(columnDefinition = "varchar(100) COMMENT '职位'")
    private String position;

    @Column(columnDefinition = "varchar(50) COMMENT '邮箱'")
    private String email;

    //需要补充的信息
    @Column
    private String language;

    @Column
    private String city;

    @Column
    private String province;

    @Column
    private String country;

    @Column(name = "remark")
    private String remark;
}
